import React from 'react';
import {Link} from 'react-router-dom';
import Icon from '@components/icon';

export default (({showRegion, caseId, text}) => (
  <div className='case-material-header'>
    <div className='go-home'>
      <Link to='/home' replace><Icon type='home' /></Link>
    </div>
    <div onClick={showRegion}>{text}</div>
    <div>
      <Link to={{
        pathname: '/home/case/material/upload',
        state: {
          caseId,
          back: {
            pathname: '/home/case/material',
            state: {caseId}
          }
        }
      }} replace>上传</Link>
    </div>
  </div>
))